--------Users----------
alter proc udsUser_Insert
	@ID varchar(50)
    ,@Name nvarchar(80)
   ,@Gender bit
   ,@Birth date
   ,@Avatar nvarchar(150)
   ,@BlogName nvarchar(80)
   ,@BlogDescription nvarchar(200)
   ,@CoverImage nvarchar(150)
   ,@Theme int
   ,@Layout tinyint
   ,@Question1  nvarchar(150)
   ,@Answer1  nvarchar(150)
   ,@Question2  nvarchar(150)
   ,@Answer2  nvarchar(150)
   ,@Password  varchar(50)
as
Begin
Declare @i INT
Select @i=COUNT(*)from [dbo].[USER] where ID=@ID
IF(@i=0)
Begin 
	INSERT INTO [BlogsProvider].[dbo].[USER]
           ([ID]
           ,[Name]
           ,[Gender]
           ,[Birth]
           ,[Avatar]
           ,[BlogName]
           ,[BlogDescription]
           ,[CoverImage]
           ,[Theme]
           ,[Layout]
           ,[Question1]
           ,[Answer1]
           ,[Question2]
           ,[Answer2]
           ,[Password])
     VALUES
           (@ID
           ,@Name
           ,@Gender
           ,@Birth 
           ,@Avatar 
           ,@BlogName
           ,@BlogDescription
           ,@CoverImage
           ,@Theme
           ,@Layout
           ,@Question1
           ,@Answer1
           ,@Question2
           ,@Answer2
           ,@Password)
     set @i=1
End
else 
Begin
 set @i=-1
end
return @i
end